<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>PC 端扩展【专业版】 | MuiPlayer</title>
    <meta name="generator" content="VuePress 1.8.2">
    <link rel="icon" href="/favicon.ico">
    <link rel="manifest" href="/manifest.json">
    <link rel="stylesheet" href="/css/mui-player.min.css">
    <link rel="stylesheet" href="/css/swiper.min.css">
    <link rel="stylesheet" href="/css/CommentCoreLibrary.min.css">
    <link rel="apple-touch-icon" href="https://muiplayer.oss-cn-shanghai.aliyuncs.com/static/image/logo_solid.png">
    <script src="https://www.googletagmanager.com/gtag/js?id=G-X4RSEE27EY"></script>
    <script>
            window.dataLayer = window.dataLayer || [];
            function gtag(){dataLayer.push(arguments);}
            gtag('js', new Date());

            gtag('config', 'G-X4RSEE27EY');
        </script>
    <script src="/plugin/flv.min.js"></script>
    <script src="/plugin/hls.min.js"></script>
    <script src="/js/mui-player.min.js"></script>
    <script src="/js/CommentCoreLibrary.min.js"></script>
    <script src="/js/swiper.min.js"></script>
    <script src="/js/axios.min.js"></script>
    <meta name="description" content="Mui Player 是一款优秀的 HTML5 网页视频播放器框架，提供全屏播放，播放快进，视频弹幕，解码等最常用的视频播放功能">
    <meta name="charset" content="utf-8">
    <meta name="baidu-site-verification" content="code-AdGRxnQ9NZ">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta property="og:site_name" content="MuiPlayer">
    <meta property="og:type" content="article">
    <meta property="og:image" content="https://muiplayer.oss-cn-shanghai.aliyuncs.com/static/image/mobile_preview.png">
    <meta name="theme-color" content="#FFFFFF">
    <meta property="og:title" content="">
    <meta property="og:description" content="Mui Player is an excellent HTML5 web page video player framework, providing fullscreen play, fast forward play, video danmaku, decoding and other most commonly used video play functions">
    <meta property="og:url" content="https://muiplayer.js.org/">
    <meta property="og:locale" content="en-US">
    <meta property="twitter:title" content="">
    <meta property="twitter:description" content="Mui Player is an excellent HTML5 web page video player framework, providing fullscreen play, fast forward play, video danmaku, decoding and other most commonly used video play functions">
    <meta name="keywords" content="HTML5 video, player, hls, danmaku, adaptive-bitrate, muiplayer">
    
    <link rel="preload" href="/assets/css/0.styles.ae6ed136.css" as="style"><link rel="preload" href="/assets/js/app.3641bd26.js" as="script"><link rel="preload" href="/assets/js/23.35f66f6c.js" as="script"><link rel="preload" href="/assets/js/3.67a24b41.js" as="script"><link rel="preload" href="/assets/js/59.092c0de9.js" as="script"><link rel="preload" href="/assets/js/15.78fdfcaf.js" as="script"><link rel="prefetch" href="/assets/js/1.54927c41.js"><link rel="prefetch" href="/assets/js/10.dd4adaf8.js"><link rel="prefetch" href="/assets/js/11.ea997365.js"><link rel="prefetch" href="/assets/js/12.01af38a6.js"><link rel="prefetch" href="/assets/js/13.75800705.js"><link rel="prefetch" href="/assets/js/14.9fc60c4c.js"><link rel="prefetch" href="/assets/js/16.0101612c.js"><link rel="prefetch" href="/assets/js/17.a9b41ba5.js"><link rel="prefetch" href="/assets/js/18.a55912b8.js"><link rel="prefetch" href="/assets/js/19.13ce6fb6.js"><link rel="prefetch" href="/assets/js/20.57cf3163.js"><link rel="prefetch" href="/assets/js/21.a9f966ac.js"><link rel="prefetch" href="/assets/js/22.65e9060e.js"><link rel="prefetch" href="/assets/js/24.3adbb4ca.js"><link rel="prefetch" href="/assets/js/25.00421a1d.js"><link rel="prefetch" href="/assets/js/26.ba6e1ac8.js"><link rel="prefetch" href="/assets/js/27.4e1b228b.js"><link rel="prefetch" href="/assets/js/28.2d7617cb.js"><link rel="prefetch" href="/assets/js/29.ff74fd8e.js"><link rel="prefetch" href="/assets/js/30.ff8d825c.js"><link rel="prefetch" href="/assets/js/31.daa6ba5b.js"><link rel="prefetch" href="/assets/js/32.9eac0031.js"><link rel="prefetch" href="/assets/js/33.32a2153a.js"><link rel="prefetch" href="/assets/js/34.da24de19.js"><link rel="prefetch" href="/assets/js/35.c97bfd00.js"><link rel="prefetch" href="/assets/js/36.3fd6a073.js"><link rel="prefetch" href="/assets/js/37.262c376a.js"><link rel="prefetch" href="/assets/js/38.2bd8c4ba.js"><link rel="prefetch" href="/assets/js/39.618c3695.js"><link rel="prefetch" href="/assets/js/4.9edd66f8.js"><link rel="prefetch" href="/assets/js/40.0502620b.js"><link rel="prefetch" href="/assets/js/41.9a3bd9b3.js"><link rel="prefetch" href="/assets/js/42.8ac30a45.js"><link rel="prefetch" href="/assets/js/43.e3fc5609.js"><link rel="prefetch" href="/assets/js/44.9acf05da.js"><link rel="prefetch" href="/assets/js/45.8c740c98.js"><link rel="prefetch" href="/assets/js/46.250aba22.js"><link rel="prefetch" href="/assets/js/47.83ee64f1.js"><link rel="prefetch" href="/assets/js/48.8d559ee8.js"><link rel="prefetch" href="/assets/js/49.6eeaca4b.js"><link rel="prefetch" href="/assets/js/5.35f74ec6.js"><link rel="prefetch" href="/assets/js/50.6e5e287b.js"><link rel="prefetch" href="/assets/js/51.ff3ae70a.js"><link rel="prefetch" href="/assets/js/52.378b3b20.js"><link rel="prefetch" href="/assets/js/53.868673eb.js"><link rel="prefetch" href="/assets/js/54.3c62a57a.js"><link rel="prefetch" href="/assets/js/55.035ed35d.js"><link rel="prefetch" href="/assets/js/56.08925c33.js"><link rel="prefetch" href="/assets/js/57.5d073ed4.js"><link rel="prefetch" href="/assets/js/58.dce950e6.js"><link rel="prefetch" href="/assets/js/6.30b43e5d.js"><link rel="prefetch" href="/assets/js/60.8526ebe1.js"><link rel="prefetch" href="/assets/js/61.c02d2349.js"><link rel="prefetch" href="/assets/js/62.b93eeaf2.js"><link rel="prefetch" href="/assets/js/63.b363131d.js"><link rel="prefetch" href="/assets/js/64.0cda51e1.js"><link rel="prefetch" href="/assets/js/65.d26b33ae.js"><link rel="prefetch" href="/assets/js/66.d07350b7.js"><link rel="prefetch" href="/assets/js/67.85653372.js"><link rel="prefetch" href="/assets/js/7.7232d571.js"><link rel="prefetch" href="/assets/js/8.772a3a10.js"><link rel="prefetch" href="/assets/js/9.5f308baf.js">
    <link rel="stylesheet" href="/assets/css/0.styles.ae6ed136.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/zh/" class="home-link router-link-active"><!----> <span class="site-name">MuiPlayer</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/zh/guide/" class="nav-link router-link-active">
  指南
</a></div><div class="nav-item"><a href="/zh/demo/" class="nav-link">
  演示
</a></div><div class="nav-item"><a href="/zh/joinUs/" class="nav-link">
  下载
</a></div><div class="nav-item"><a href="https://gitee.com/muiplayer/hello-muiplayer" target="_blank" rel="noopener noreferrer" class="nav-link external">
  码云
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="选择语言" class="dropdown-title"><span class="title">选择语言</span> <span class="arrow down"></span></button> <button type="button" aria-label="选择语言" class="mobile-dropdown-title"><span class="title">选择语言</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/guide/plus-desktop-plugin.html" class="nav-link">
  English
</a></li><li class="dropdown-item"><!----> <a href="/zh/guide/plus-desktop-plugin.html" aria-current="page" class="nav-link router-link-exact-active router-link-active">
  简体中文
</a></li></ul></div></div> <a href="https://github.com/muiplayer/hello-muiplayer" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/zh/guide/" class="nav-link router-link-active">
  指南
</a></div><div class="nav-item"><a href="/zh/demo/" class="nav-link">
  演示
</a></div><div class="nav-item"><a href="/zh/joinUs/" class="nav-link">
  下载
</a></div><div class="nav-item"><a href="https://gitee.com/muiplayer/hello-muiplayer" target="_blank" rel="noopener noreferrer" class="nav-link external">
  码云
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="选择语言" class="dropdown-title"><span class="title">选择语言</span> <span class="arrow down"></span></button> <button type="button" aria-label="选择语言" class="mobile-dropdown-title"><span class="title">选择语言</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/guide/plus-desktop-plugin.html" class="nav-link">
  English
</a></li><li class="dropdown-item"><!----> <a href="/zh/guide/plus-desktop-plugin.html" aria-current="page" class="nav-link router-link-exact-active router-link-active">
  简体中文
</a></li></ul></div></div> <a href="https://github.com/muiplayer/hello-muiplayer" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav>  <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>指南</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/zh/guide/" aria-current="page" class="sidebar-link">介绍</a></li><li><a href="/zh/guide/begin.html" class="sidebar-link">快速开始</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/zh/guide/begin.html#安装" class="sidebar-link">安装</a></li><li class="sidebar-sub-header"><a href="/zh/guide/begin.html#使用" class="sidebar-link">使用</a></li></ul></li><li><a href="/zh/guide/api.html" class="sidebar-link">API</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/zh/guide/api.html#主要配置" class="sidebar-link">主要配置</a></li><li class="sidebar-sub-header"><a href="/zh/guide/api.html#自定义配置" class="sidebar-link">自定义配置</a></li><li class="sidebar-sub-header"><a href="/zh/guide/api.html#播放事件监听" class="sidebar-link">播放事件监听</a></li><li class="sidebar-sub-header"><a href="/zh/guide/api.html#播放器接口" class="sidebar-link">播放器接口</a></li></ul></li><li><a href="/zh/guide/mui-player-desktop-plugin.html" class="sidebar-link">PC 端扩展</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/zh/guide/mui-player-desktop-plugin.html#安装" class="sidebar-link">安装</a></li><li class="sidebar-sub-header"><a href="/zh/guide/mui-player-desktop-plugin.html#开始使用" class="sidebar-link">开始使用</a></li><li class="sidebar-sub-header"><a href="/zh/guide/mui-player-desktop-plugin.html#配置选项" class="sidebar-link">配置选项</a></li><li class="sidebar-sub-header"><a href="/zh/guide/mui-player-desktop-plugin.html#自定义设置组配置" class="sidebar-link">自定义设置组配置</a></li><li class="sidebar-sub-header"><a href="/zh/guide/mui-player-desktop-plugin.html#自定义右键菜单" class="sidebar-link">自定义右键菜单</a></li><li class="sidebar-sub-header"><a href="/zh/guide/mui-player-desktop-plugin.html#动作事件监听" class="sidebar-link">动作事件监听</a></li></ul></li><li><a href="/zh/guide/plus-desktop-plugin.html" aria-current="page" class="active sidebar-link">PC 端扩展【专业版】</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/zh/guide/plus-desktop-plugin.html#下载" class="sidebar-link">下载</a></li><li class="sidebar-sub-header"><a href="/zh/guide/plus-desktop-plugin.html#开始使用" class="sidebar-link">开始使用</a></li><li class="sidebar-sub-header"><a href="/zh/guide/plus-desktop-plugin.html#配置选项-plus" class="sidebar-link">配置选项 Plus</a></li><li class="sidebar-sub-header"><a href="/zh/guide/plus-desktop-plugin.html#接口-plus" class="sidebar-link">接口 Plus</a></li></ul></li><li><a href="/zh/guide/plus-mobile-plugin.html" class="sidebar-link">移动端扩展【专业版】</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/zh/guide/plus-mobile-plugin.html#扫码演示" class="sidebar-link">扫码演示</a></li><li class="sidebar-sub-header"><a href="/zh/guide/plus-mobile-plugin.html#下载" class="sidebar-link">下载</a></li><li class="sidebar-sub-header"><a href="/zh/guide/plus-mobile-plugin.html#开始使用" class="sidebar-link">开始使用</a></li><li class="sidebar-sub-header"><a href="/zh/guide/plus-mobile-plugin.html#配置选项" class="sidebar-link">配置选项</a></li><li class="sidebar-sub-header"><a href="/zh/guide/plus-mobile-plugin.html#动作事件监听" class="sidebar-link">动作事件监听</a></li></ul></li><li><a href="/zh/guide/preset.html" class="sidebar-link">MediaSource 支持</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/zh/guide/preset.html#使用-hls-js-或者-flv-js" class="sidebar-link">使用 hls.js 或者 flv.js</a></li><li class="sidebar-sub-header"><a href="/zh/guide/preset.html#配置" class="sidebar-link">配置</a></li><li class="sidebar-sub-header"><a href="/zh/guide/preset.html#自定义使用mse库" class="sidebar-link">自定义使用MSE库</a></li></ul></li><li><a href="/zh/guide/thumbnails.html" class="sidebar-link">视频缩略图</a><ul class="sidebar-sub-headers"></ul></li><li><a href="/zh/guide/barrage.html" class="sidebar-link">视频弹幕</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/zh/guide/barrage.html#使用-commentcorelibrary" class="sidebar-link">使用 CommentCoreLibrary</a></li></ul></li><li><a href="/zh/guide/subtitle.html" class="sidebar-link">视频字幕</a><ul class="sidebar-sub-headers"></ul></li><li><a href="/zh/guide/custom-control.html" class="sidebar-link">自定义播放器控件</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/zh/guide/custom-control.html#配置选项" class="sidebar-link">配置选项</a></li><li class="sidebar-sub-header"><a href="/zh/guide/custom-control.html#示例一-自定义播放器头按钮" class="sidebar-link">示例一：自定义播放器头按钮</a></li><li class="sidebar-sub-header"><a href="/zh/guide/custom-control.html#示例二-自定义播放器底部按钮" class="sidebar-link">示例二：自定义播放器底部按钮</a></li><li class="sidebar-sub-header"><a href="/zh/guide/custom-control.html#示例三-自定义右侧栏弹出窗口" class="sidebar-link">示例三：自定义右侧栏弹出窗口</a></li></ul></li><li><a href="/zh/guide/uni-app.html" class="sidebar-link">在 uni-app 中使用</a><ul class="sidebar-sub-headers"></ul></li><li><a href="/zh/guide/other-problem.html" class="sidebar-link">其他问题</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="pc-端扩展【专业版】"><a href="#pc-端扩展【专业版】" class="header-anchor">#</a> PC 端扩展【专业版】</h1> <div class="custom-block tip"><p class="custom-block-title">提示</p> <p>PC 端扩展组件，该扩展新增了播放器在桌面端更多的功能性支持，包含弹幕输入、广告悬浮窗、视频水印、小窗口播放、进度位提示点和视频截图等。</p> <p>插件使用原生 Js 的编写，因此在编写功能接口在代码上并未产生冗余从而导致体积包的增大。扩展插件通常是保持最新的版本，在使用该插件之前请更新到 mui-player 主文件到最新版本。</p></div> <!----> <h2 id="下载"><a href="#下载" class="header-anchor">#</a> 下载</h2> <div class="custom-block warning"><p class="custom-block-title">增值服务</p> <p>该插件由专业版提供支持，如需获取插件，请 <a href="/zh/joinUs/#专业版插件">点击这里</a> 查看专业版插件下载。</p></div> <h2 id="开始使用"><a href="#开始使用" class="header-anchor">#</a> 开始使用</h2> <p>在页面引入 <strong>mui-player-desktop-plugin.js</strong>，插件需要在初始化播放器之前加载：</p> <div class="language-html extra-class"><pre class="language-html"><code><span class="token comment">&lt;!-- 使用标签引入 “专业版” 扩展组件 --&gt;</span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>script</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>text/javascript<span class="token punctuation">&quot;</span></span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>js/mui-player-desktop-plugin.min.js<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token script"></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>script</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><p>在主配置项 plugins 中传入：</p> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">var</span> mp <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">MuiPlayer</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    container<span class="token operator">:</span><span class="token string">'#mui-player'</span><span class="token punctuation">,</span>
    src<span class="token operator">:</span><span class="token string">'../media/media.mp4'</span><span class="token punctuation">,</span>
    <span class="token operator">...</span>
    
    plugins<span class="token operator">:</span><span class="token punctuation">[</span>
        <span class="token keyword">new</span> <span class="token class-name">MuiPlayerDesktopPlugin</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
            key<span class="token operator">:</span> <span class="token string">'配置您插件密文'</span><span class="token punctuation">,</span>
            <span class="token operator">...</span>
        <span class="token punctuation">}</span><span class="token punctuation">)</span>
    <span class="token punctuation">]</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="配置选项-plus"><a href="#配置选项-plus" class="header-anchor">#</a> 配置选项 Plus</h2> <p>示例创建一个弹幕输入组件：</p> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">new</span> <span class="token class-name">MuiPlayerDesktopPlugin</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    key<span class="token operator">:</span> <span class="token string">'配置您插件密文'</span><span class="token punctuation">,</span>
    danmakuComponent<span class="token operator">:</span><span class="token punctuation">{</span>
        open<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token comment">// 是否开启弹幕组件</span>
        growSize<span class="token operator">:</span> <span class="token number">0.65</span><span class="token punctuation">,</span> <span class="token comment">// 组件占据容器的宽度比例，取值范围：0 - 1</span>
        buttonText<span class="token operator">:</span> <span class="token string">'发送'</span><span class="token punctuation">,</span>
        <span class="token function">onSend</span><span class="token punctuation">(</span><span class="token parameter">text<span class="token punctuation">,</span> cleanText</span><span class="token punctuation">)</span> <span class="token punctuation">{</span> <span class="token comment">// 监听文本发送内容的函数回调</span>
            <span class="token comment">// axtion</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span>
</code></pre></div><table><thead><tr><th>属性名</th> <th>类型</th> <th>默认值</th> <th>说明</th></tr></thead> <tbody><tr><td>danmakuComponent</td> <td>Object</td> <td>{}</td> <td>创建一个弹幕输入组件</td></tr> <tr><td>danmakuComponent.open</td> <td>Object</td> <td>true</td> <td>是否开启弹幕组件</td></tr> <tr><td>danmakuComponent.growSize</td> <td>Number</td> <td>0.65</td> <td>组件占据容器的宽度比例，取值范围：0 - 1</td></tr> <tr><td>danmakuComponent.position</td> <td>String</td> <td>left</td> <td>组件排列的位置，可取值 left | right | center</td></tr> <tr><td>danmakuComponent.buttonText</td> <td>String</td> <td>-</td> <td>按钮显示的文字</td></tr> <tr><td>danmakuComponent.placeholder</td> <td>String</td> <td>-</td> <td>弹幕文本录入框显示的占位符</td></tr> <tr><td>danmakuComponent.onSend</td> <td>Function</td> <td>(text,cleanText)</td> <td>监听文本发送内容的函数回调，方法接收两个回调参数：<br>text：String - 表示文本内容<br>cleanText：Function - 调用函数清空文本输入框内容</td></tr> <tr><td>danmakuComponent.loadIntercept</td> <td>Function</td> <td>(Element)</td> <td>在组件加载之前进行拦截，通常这里是做对组件重写的动作，回调函数 Element 返回该控件元素</td></tr> <tr><td>danmakuComponent.style</td> <td>Object</td> <td>{}</td> <td>组件的附加样式</td></tr> <tr><td>#</td> <td></td> <td></td> <td></td></tr> <tr><td>prompt</td> <td>Object</td> <td></td> <td>进度条指示点</td></tr> <tr><td>prompt.dotColor</td> <td>String</td> <td>#F8F8FF</td> <td>颜色</td></tr> <tr><td>prompt.hoverShow</td> <td>Boolean</td> <td>false</td> <td>是否只在鼠标悬停时显示</td></tr> <tr><td>prompt.items</td> <td>Array</td> <td>{}</td> <td>进度条指示点配置项，数组中元素传入配置对象包括：<br>time: &lt;<code>Number</code>&gt; 时间节点/单位秒<br>content: &lt;<code>String | Element</code>&gt; 鼠标悬浮提示内容<br>style：&lt;<code>Object</code>&gt; 自定义项样式</td></tr> <tr><td>#</td> <td></td> <td></td> <td></td></tr> <tr><td>seekLine</td> <td>Object</td> <td>true</td> <td>显示寻址线</td></tr> <tr><td>#</td> <td></td> <td></td> <td></td></tr></tbody></table> <h2 id="接口-plus"><a href="#接口-plus" class="header-anchor">#</a> 接口 Plus</h2> <table><thead><tr><th>方法名</th> <th>类型</th> <th>默认值</th> <th>必填</th> <th>说明</th></tr></thead> <tbody><tr><td>PopupAdvertise</td> <td>Function</td> <td></td> <td></td> <td>弹出广告悬浮窗：<br><a href="#%E5%BC%B9%E5%87%BA%E5%B9%BF%E5%91%8A%E6%82%AC%E6%B5%AE%E7%AA%97">示例</a></td></tr> <tr><td>PopupAdvertise.content</td> <td>HTMLElement | String</td> <td></td> <td>Y</td> <td>广告窗内容</td></tr> <tr><td>PopupAdvertise.style</td> <td>Object</td> <td>{}</td> <td></td> <td>自定义附加弹出窗样式</td></tr> <tr><td>#</td> <td></td> <td></td> <td></td> <td></td></tr> <tr><td>addWatermark</td> <td>Function</td> <td></td> <td></td> <td>添加窗口播放水印：<a href="#%E5%88%9B%E5%BB%BA%E8%A7%86%E9%A2%91%E8%B4%B4%E7%89%87%E6%B0%B4%E5%8D%B0">示例</a></td></tr> <tr><td>addWatermark.image</td> <td>String</td> <td></td> <td>Y</td> <td>嵌入水印的图片路径</td></tr> <tr><td>addWatermark.scale</td> <td>Number</td> <td>1</td> <td></td> <td>水印显示的缩放比</td></tr> <tr><td>addWatermark.position</td> <td>String</td> <td>top-right</td> <td></td> <td>水印显示的位置，可选：<code>top-right</code> <code>top-left</code> <code>bottom-left</code> <code>bottom-right</code></td></tr> <tr><td>#</td> <td></td> <td></td> <td></td> <td></td></tr> <tr><td>createRolling</td> <td>Function</td> <td></td> <td></td> <td>创建一个窗口轮询滚动的内容提示，参数配置：<a href="#%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E7%AA%97%E5%8F%A3%E8%BD%AE%E8%AF%A2%E6%BB%9A%E5%8A%A8%E7%9A%84%E5%86%85%E5%AE%B9%E6%8F%90%E7%A4%BA-%E8%B7%91%E9%A9%AC%E7%81%AF%E6%95%88%E6%9E%9C">示例</a></td></tr> <tr><td>createRolling.id</td> <td>String</td> <td></td> <td>Y</td> <td>滚动播放的ID标识，如需创建多个滚动窗口该参数必须声明</td></tr> <tr><td>createRolling.scrollamount</td> <td>Number</td> <td>6</td> <td></td> <td>设置每次滚动时移动的长度（以像素为单位）</td></tr> <tr><td>createRolling.scrolldelay</td> <td>Number</td> <td>85</td> <td></td> <td>设置每次滚动时的时间间隔（以毫秒为单位）</td></tr> <tr><td>createRolling.loop</td> <td>Number</td> <td>-1</td> <td></td> <td>设置滚动次数，默认值为 −1，表示将连续滚动</td></tr> <tr><td>createRolling.style</td> <td>Object</td> <td>{}</td> <td></td> <td>自定义添加内容滚动样式</td></tr> <tr><td>createRolling.onstart</td> <td>Function</td> <td></td> <td></td> <td>监听函数，当创建开始滚动时触发一次</td></tr> <tr><td>createRolling.onfinish</td> <td>Function</td> <td></td> <td></td> <td>监听函数，滚动结束后触发，当 loop != -1 时有效</td></tr> <tr><td>createRolling.stop</td> <td>Function</td> <td></td> <td></td> <td>暂停滚动</td></tr> <tr><td>createRolling.start</td> <td>Function</td> <td></td> <td></td> <td>开始滚动</td></tr> <tr><td>#</td> <td></td> <td></td> <td></td> <td></td></tr> <tr><td>screenshot</td> <td>Function</td> <td></td> <td></td> <td>截图功能，获取当前播放的视频帧：<a href="#%E8%8E%B7%E5%8F%96%E5%BD%93%E5%89%8D%E6%92%AD%E6%94%BE%E6%97%B6%E9%97%B4%E7%9A%84%E8%A7%86%E9%A2%91%E5%B8%A7">示例</a></td></tr> <tr><td>screenshot.width</td> <td>Number</td> <td>videoWidth</td> <td></td> <td>视频截图画布的宽度</td></tr> <tr><td>screenshot.height</td> <td>Number</td> <td>videoHeight</td> <td></td> <td>视频画布截图的高度</td></tr> <tr><td>screenshot.quality</td> <td>Number</td> <td>0.92</td> <td></td> <td>设置 jpegs 图片输出的质量，取值 0 - 1</td></tr> <tr><td>screenshot.type</td> <td>String</td> <td>image/png</td> <td></td> <td>输出的图片格式，可选：<code>image/png</code> <code>image/jpeg</code> <code>image/webp</code></td></tr> <tr><td>screenshot.scale</td> <td>Number</td> <td>devicePixelRatio</td> <td></td> <td>截图渲染的缩放比例，取值 0 - 1</td></tr> <tr><td>screenshot.watermark</td> <td></td> <td>{ image, scale, position }</td> <td></td> <td>添加截图水印，参数配置相同于 <code>addWatermark</code> 函数接口</td></tr> <tr><td>screenshot.onDone</td> <td>Function</td> <td>{ base64, currentTime, download }</td> <td></td> <td>完成时回调函数</td></tr> <tr><td>screenshot.onFail</td> <td>Function</td> <td>(error)</td> <td></td> <td>失败时回调函数</td></tr> <tr><td>#</td> <td></td> <td></td> <td></td> <td></td></tr> <tr><td>switchMiniPlayer</td> <td>Function</td> <td>(open, option)</td> <td></td> <td>开启/关闭 小窗口播放，函数传递<code>open &lt;Boolean&gt;</code> 表示打开或者关闭小窗播放，<code>option &lt;Object&gt;</code> 传递所有小窗可配置参数：<a href="#%E5%B0%8F%E7%AA%97%E5%8F%A3%E6%92%AD%E6%94%BE">示例</a></td></tr> <tr><td>switchMiniPlayer.width</td> <td>Number | String</td> <td>400</td> <td></td> <td>小窗宽度</td></tr> <tr><td>switchMiniPlayer.height</td> <td>Number | String</td> <td>auto</td> <td></td> <td>小窗高度</td></tr> <tr><td>switchMiniPlayer.bottom</td> <td>Number | String</td> <td>50</td> <td></td> <td>定位窗口底部的距离</td></tr> <tr><td>switchMiniPlayer.right</td> <td>Number | String</td> <td>50</td> <td></td> <td>定位窗口右边的距离</td></tr> <tr><td>switchMiniPlayer.keepPlayerLayer</td> <td>Boolean</td> <td>true</td> <td></td> <td>保护播放器父级容器的大小</td></tr> <tr><td>switchMiniPlayer.transition</td> <td>Boolean</td> <td>true</td> <td></td> <td>是否开启小窗动画</td></tr> <tr><td>switchMiniPlayer.transitionDuration</td> <td>Number</td> <td>0.35</td> <td></td> <td>动画时间</td></tr> <tr><td>switchMiniPlayer.transitionTiming</td> <td>String</td> <td>ease</td> <td></td> <td>动画的过渡效果</td></tr> <tr><td>#</td> <td></td> <td></td> <td></td> <td></td></tr> <tr><td>createSettingPopup</td> <td>Function</td> <td></td> <td></td> <td>创建并弹出一个选项设置窗口：<a href="#%E5%88%9B%E5%BB%BA%E5%B9%B6%E5%BC%B9%E5%87%BA%E4%B8%80%E4%B8%AA%E9%80%89%E9%A1%B9%E8%AE%BE%E7%BD%AE%E7%AA%97%E5%8F%A3">示例</a></td></tr> <tr><td>createSettingPopup.name</td> <td>String</td> <td></td> <td>Y</td> <td>弹窗标识ID</td></tr> <tr><td>createSettingPopup.configs</td> <td>Array</td> <td></td> <td>Y</td> <td>配置项，配置规则参考： <a href="/zh/guide/mui-player-desktop-plugin.html#自定义设置组配置">自定义设置组配置</a></td></tr> <tr><td>createSettingPopup.offseDistance</td> <td>Number</td> <td>0</td> <td></td> <td>指定 popup 偏移距离</td></tr> <tr><td>#</td> <td></td> <td></td> <td></td> <td></td></tr></tbody></table> <h4 id="弹出广告悬浮窗"><a href="#弹出广告悬浮窗" class="header-anchor">#</a> 弹出广告悬浮窗</h4> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token comment">// 动态创建弹出广告悬浮窗的内容</span>
<span class="token keyword">var</span> vnode <span class="token operator">=</span> document<span class="token punctuation">.</span><span class="token function">createElement</span><span class="token punctuation">(</span><span class="token string">'img'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
vnode<span class="token punctuation">.</span>src <span class="token operator">=</span> <span class="token string">'../static/ads.jpg'</span><span class="token punctuation">;</span>
vnode<span class="token punctuation">.</span>style<span class="token punctuation">.</span>width <span class="token operator">=</span> <span class="token string">'100%'</span><span class="token punctuation">;</span>
vnode<span class="token punctuation">.</span>style<span class="token punctuation">.</span>height <span class="token operator">=</span> <span class="token string">'100%'</span><span class="token punctuation">;</span>
vnode<span class="token punctuation">.</span><span class="token function-variable function">onclick</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token parameter">e</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
    e<span class="token punctuation">.</span><span class="token function">stopPropagation</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">'on click action...'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

mp<span class="token punctuation">.</span><span class="token function">popupAdvertise</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    content<span class="token operator">:</span> vnode<span class="token punctuation">,</span>
    style<span class="token operator">:</span><span class="token punctuation">{</span><span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h4 id="创建视频贴片水印"><a href="#创建视频贴片水印" class="header-anchor">#</a> 创建视频贴片水印：</h4> <div class="language-javascript extra-class"><pre class="language-javascript"><code>mp<span class="token punctuation">.</span><span class="token function">addWatermark</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    image<span class="token operator">:</span> <span class="token string">'https://muiplayer.oss-cn-shanghai.aliyuncs.com/static/image/logot.png'</span><span class="token punctuation">,</span>
    scale<span class="token operator">:</span> <span class="token number">0.5</span><span class="token punctuation">,</span>
    position<span class="token operator">:</span><span class="token string">'top-right'</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span>
</code></pre></div><h4 id="创建一个窗口轮询滚动的内容提示-跑马灯效果"><a href="#创建一个窗口轮询滚动的内容提示-跑马灯效果" class="header-anchor">#</a> 创建一个窗口轮询滚动的内容提示（跑马灯效果）</h4> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">var</span> rolling <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">mp<span class="token punctuation">.</span>createRolling</span><span class="token punctuation">(</span>content <span class="token punctuation">,</span><span class="token punctuation">{</span>
    id<span class="token operator">:</span> <span class="token string">'warning'</span><span class="token punctuation">,</span>
    scrollamount<span class="token operator">:</span><span class="token number">6</span><span class="token punctuation">,</span> <span class="token comment">// 设置每次滚动时移动的长度（以像素为单位）</span>
    scrolldelay<span class="token operator">:</span><span class="token number">85</span><span class="token punctuation">,</span> <span class="token comment">// 设置每次滚动时的时间间隔（以毫秒为单位）</span>
    loop<span class="token operator">:</span><span class="token number">2</span><span class="token punctuation">,</span> <span class="token comment">// 设置滚动次数，默认值为 −1，表示将连续滚动。</span>
    style<span class="token operator">:</span><span class="token punctuation">{</span>
        paddingBottom<span class="token operator">:</span> <span class="token string">'25px'</span><span class="token punctuation">,</span>
        paddingTop<span class="token operator">:</span> <span class="token string">'25px'</span><span class="token punctuation">,</span>
        textShadow<span class="token operator">:</span> <span class="token string">'0px 0px 3px rgb(0 0 0)'</span><span class="token punctuation">,</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

rolling<span class="token punctuation">.</span><span class="token function">onstart</span><span class="token punctuation">(</span><span class="token keyword">function</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">'Rolling Start...'</span><span class="token punctuation">)</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

rolling<span class="token punctuation">.</span><span class="token function">onfinish</span><span class="token punctuation">(</span><span class="token keyword">function</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">'Rolling Finish...'</span><span class="token punctuation">)</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">// rolling.stop(); // 暂停滚动</span>
<span class="token comment">// rolling.start(); // 开始滚动</span>
</code></pre></div><h4 id="获取当前播放时间的视频帧"><a href="#获取当前播放时间的视频帧" class="header-anchor">#</a> 获取当前播放时间的视频帧</h4> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token comment">/**
* 获取当前播放时间的视频截图
* 注意: 一些 HTML元素设定了对 CORS 的支持，例如：&lt;img&gt;、&lt;audio&gt;、&lt;video&gt; 标签等，这意味着调用 screenshot 截图方法可能会产生跨域从行为不被支持！在同源安全策略才可能被支持，同时设置元素的 crossOrigin 属性
* 参考：https://developer.mozilla.org/zh-CN/docs/Web/HTML/Attributes/crossorigin
*/</span>
mp<span class="token punctuation">.</span><span class="token function">screenshot</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    quality<span class="token operator">:</span> <span class="token number">0.92</span><span class="token punctuation">,</span>
    type<span class="token operator">:</span> <span class="token string">'image/jpeg'</span><span class="token punctuation">,</span>
    scale<span class="token operator">:</span><span class="token number">0.5</span><span class="token punctuation">,</span>
    watermark<span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token comment">// 添加截图水印</span>
        image<span class="token operator">:</span> <span class="token string">'https://muiplayer.oss-cn-shanghai.aliyuncs.com/static/image/logot.png'</span><span class="token punctuation">,</span>
        scale<span class="token operator">:</span> <span class="token number">0.75</span><span class="token punctuation">,</span>
        position<span class="token operator">:</span><span class="token string">'top-right'</span><span class="token punctuation">,</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token function-variable function">onDone</span><span class="token operator">:</span><span class="token keyword">function</span><span class="token punctuation">(</span><span class="token parameter">data</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">let</span> <span class="token punctuation">{</span> base64<span class="token punctuation">,</span> currentTime<span class="token punctuation">,</span> download <span class="token punctuation">}</span> <span class="token operator">=</span> data<span class="token punctuation">;</span>
        <span class="token function">download</span><span class="token punctuation">(</span><span class="token string">'File Name'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token function-variable function">onFail</span><span class="token operator">:</span><span class="token keyword">function</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        console<span class="token punctuation">.</span><span class="token function">error</span><span class="token punctuation">(</span><span class="token string">'screenshot error...'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h4 id="小窗口播放"><a href="#小窗口播放" class="header-anchor">#</a> 小窗口播放</h4> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token comment">// 开启小窗</span>
mp<span class="token punctuation">.</span><span class="token function">switchMiniPlayer</span><span class="token punctuation">(</span><span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token punctuation">{</span>
    width<span class="token operator">:</span> <span class="token number">400</span><span class="token punctuation">,</span>
    height<span class="token operator">:</span> <span class="token string">'auto'</span><span class="token punctuation">,</span>
    bottom<span class="token operator">:</span> <span class="token number">50</span><span class="token punctuation">,</span>
    right<span class="token operator">:</span> <span class="token number">50</span><span class="token punctuation">,</span>
    keepPlayerLayer<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
    transition<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
    transitionDuration<span class="token operator">:</span> <span class="token number">0.35</span><span class="token punctuation">,</span>
    transitionTiming<span class="token operator">:</span> <span class="token string">'ease'</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">// 关闭小窗</span>
mp<span class="token punctuation">.</span><span class="token function">switchMiniPlayer</span><span class="token punctuation">(</span><span class="token boolean">false</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h4 id="创建并弹出一个选项设置窗口"><a href="#创建并弹出一个选项设置窗口" class="header-anchor">#</a> 创建并弹出一个选项设置窗口</h4> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">var</span> danmakuConfigs <span class="token operator">=</span> <span class="token punctuation">[</span>
    <span class="token punctuation">{</span>
        functions<span class="token operator">:</span><span class="token string">'弹幕'</span><span class="token punctuation">,</span>
        model<span class="token operator">:</span><span class="token string">'switch'</span><span class="token punctuation">,</span>
        selected<span class="token operator">:</span><span class="token boolean">true</span><span class="token punctuation">,</span>
        <span class="token function-variable function">onToggle</span><span class="token operator">:</span><span class="token punctuation">(</span><span class="token parameter">data<span class="token punctuation">,</span> selected<span class="token punctuation">,</span> back</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span> <span class="token operator">...</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token punctuation">{</span>
        functions<span class="token operator">:</span><span class="token string">'字体大小'</span><span class="token punctuation">,</span>
        childConfig<span class="token operator">:</span><span class="token punctuation">[</span>
            <span class="token punctuation">{</span> functions<span class="token operator">:</span><span class="token string">'12 PX'</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token punctuation">{</span> functions<span class="token operator">:</span><span class="token string">'16 PX'</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token punctuation">{</span> functions<span class="token operator">:</span><span class="token string">'18 PX'</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token punctuation">{</span> functions<span class="token operator">:</span><span class="token string">'25 PX'</span><span class="token punctuation">,</span>selected<span class="token operator">:</span><span class="token boolean">true</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token punctuation">{</span> functions<span class="token operator">:</span><span class="token string">'36 PX'</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token punctuation">{</span> functions<span class="token operator">:</span><span class="token string">'45 PX'</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token punctuation">{</span> functions<span class="token operator">:</span><span class="token string">'64 PX'</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token function-variable function">onToggle</span><span class="token operator">:</span><span class="token punctuation">(</span><span class="token parameter">data<span class="token punctuation">,</span> selected<span class="token punctuation">,</span> back</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span> <span class="token operator">...</span> <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">]</span><span class="token punctuation">;</span>

mp<span class="token punctuation">.</span><span class="token function">createSettingPopup</span><span class="token punctuation">(</span>event<span class="token punctuation">,</span> <span class="token punctuation">{</span>
    name<span class="token operator">:</span> <span class="token string">'danmakuConfigs'</span><span class="token punctuation">,</span> <span class="token comment">// 指定的名称，必填</span>
    configs<span class="token operator">:</span> danmakuConfigs<span class="token punctuation">,</span> <span class="token comment">// 配置项目</span>
    offseDistance<span class="token operator">:</span> <span class="token number">47</span><span class="token punctuation">,</span> <span class="token comment">// 指定 popup 偏移距离</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div></div> <footer class="page-edit"><div class="edit-link"><a href="https://github.com/muiplayer/hello-muiplayer/edit/master/docs/docs/zh/guide/plus-desktop-plugin.md" target="_blank" rel="noopener noreferrer">帮助我们改善此页面！</a> <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></div> <div class="last-updated"><span class="prefix">上次更新:</span> <span class="time">2023/1/23 下午11:15:00</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
      ←
      <a href="/zh/guide/mui-player-desktop-plugin.html" class="prev">
        PC 端扩展
      </a></span> <span class="next"><a href="/zh/guide/plus-mobile-plugin.html">
        移动端扩展【专业版】
      </a>
      →
    </span></p></div> </main></div><div class="global-ui"><!----><!----></div></div>
    <script src="/assets/js/app.3641bd26.js" defer></script><script src="/assets/js/23.35f66f6c.js" defer></script><script src="/assets/js/3.67a24b41.js" defer></script><script src="/assets/js/59.092c0de9.js" defer></script><script src="/assets/js/15.78fdfcaf.js" defer></script>
  </body>
</html>
